import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 64355
 * Date: 2022-08-07
 * Time: 23:11
 */



public class Chen {
    public static void main(String[] args) {
        int []array={1,3,5,7,9};
        int []array2=Arrays.copyOf(array,array.length);
//        System.out.println(Arrays.toString(array));
//        System.out.println(Arrays.toString(array2));
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }
    }
    public static String myTOString(int [] tmp){
    if(tmp==null){
        return "null";
    }
    String ret ="[";
    for (int i = 0; i < tmp.length; i++) {
        ret+=tmp[i];
        if(i!= tmp.length-1){
            ret+=",";
        }
    }
    ret+="]";
    return ret;
}

    public static void main1(String[] args) {
        int [] array=null;
//        int [] array={1,2,3,4}
//        String ret= Arrays.toString(array);
        String ret=myTOString(array);
        System.out.println(ret);
    }
}
